package semantic.analyzer;

import java.util.List;

import semantic.SemanticException;
import semantic.model.ExpressionNode;
import semantic.model.PrimaryExpressionNode;

public class EqExpressionAnalyzer {

	public static void check(List<PrimaryExpressionNode> nodes, ExpressionNode node2) throws Exception {
		ExpressionNode expNode1 = GodAnalyzer.check(nodes);
		if (!expNode1.getType().equalsIgnoreCase(node2.getType())) {
			throw new SemanticException("Inconformidade de tipos entre '" + expNode1.getType() + "' e '" + node2.getType() + "'");
		}
	}
	
}
